package com.hspedu.homework.homework03;

public class homework07 {
    public static void main(String[] args) {
          //演示枚举用swtich
        color gre=color.GREEN;
        gre.show();
        switch (gre){
            case GREEN:{
                System.out.println("匹配 Liuse");
                break;

            }
            case RED:{

                System.out.println("匹配 红色");
                break;
            }

            case BULE:{
                System.out.println("匹配蓝色");
                break;
            }
            default:{
                System.out.println("匹配未成功");
            }
        }

    }
}
interface show{

    void show();

}
enum  color implements show{
    BULE(0,200,0),RED(200,0,0),GREEN(0,0,200);

    private final int red;
private final int bule;
private final int green;

    color(int red, int bule, int green) {
        this.red = red;
        this.bule = bule;
        this.green = green;
    }
public void show()
{

    System.out.println("属性值"+red+" "+bule+" "+green );
}
}